{extend name="public:layout" /}
{block name="content"}
<h4 class="text-success text-center">分类管理</h4>

<table class="table table-striped table-hover text-center">
    <tr>
        <td>ID</td>
        <td>栏目名称</td>
        <td>排序</td>
        <td>状态</td>
        <td>创建时间</td>
        <td colspan="2">操作</td>
    </tr>
    {volist name="cateList" id="cate" empty="$empty"}
    <tr>
        <td>{$cate.id}</td>
        <td>{$cate.name}</td>
        <td>{$cate.sort}</td>
        <td>
            {eq name="$cate.status" value="1"}
            <span style="color: forestgreen;">显示</span>
            {else/}
            <span style="color: gray;">隐藏</span>
            {/eq}
        </td>
        <td>{$cate.create_time}</td>
        <td><a href="{:url('edit',['id'=>$cate.id])}">编辑</a></td>
        <td><a href="{:url('doDel',['id'=>$cate.id])}" onclick="return confirm('确定要删除吗？')">删除</a></td>
    </tr>
    {/volist}
</table>
<!-- 分类需要添加操作 -->
<a class="btn btn-info" href="{:url('edit',['id'=>0])}" role="button">添加分类</a>
{/block}